<?php
/*
 * 图片预览 逻辑文件
 * @package    
 * @author     Mark
 * @copyright  Copyright (c) 2013 ixdcw team
 * @version    $Id: 7e4bf604e94d29944cae1c9af0e16d89b5bd41a1 $
 */
defined('IN_IXDCW') or exit('Access Denied');
$carId     = isset($carid) ? intval($carid) : 0;
$pictureId = isset($pictureid) ? intval($pictureid) : 0;
$modelId   = isset($modelId) ? intval($modelId) : 0;

if (!$carId) {
	$modelInfo = AutoModel::get($modelId);
	$carId = $modelInfo['arcid'];
}
//打开页面后，首张图片信息
$pictureInfo = AutoPicture::getPicturesInfo($carid, $pictureid);

if (!$alid) {
	$alid = $pictureInfo['alid'];
}
//品牌
$brandId   = AutoCar::getBrandId($carid);
$brandName = Auto::getName($brandId);

//生产商
$manufactorId   = AutoCar::getManufactorId($carid);
$manufactorName = Auto::getName($manufactorId);

//车系
$carName = Auto::getName($carid);

//车款名称
$modelArr = Auto::getManyModelName($carid);
foreach ($modelArr as $val) {
	$modelName[$val['amid']] = $val['name'];
}


//接收选中车款的传值
if (isset($a) && $a != 0) $amid = $a;

//车款id
if (isset($modelid) && $modelid != 0) $amid = $modelid;

$pictureCats = AutoPicture::getPicturesShow($carid,$amid);
//输出
$pictureShowInfos     = AutoPicture::getPicturesAPI($carid, $amid, $pictureId, $alid);

include template('pictureShow', $module);